package com.simple.create.factory.sample1;

import com.simple.LogUtil;

public class SendFactory {
    public Sender produce(String type) {
        if ("mail".equals(type)) {
            return new MailSender();
        } else if ("sms".equals(type)) {
            return new SmsSender();
        } else {
            LogUtil.info("can not find Sender type");
            return null;
        }
    }
}
